<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/warehouseins/Warehousein.jsx此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/system/warehouseins/Warehousein.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'WarehouseinId',
            footer: "Foots",
            cnName: '入库表',
            name: 'warehouseins/Warehousein',
            url: "/Warehousein/",
            sortName: "WarehouseinId"
        });



        const editFormFields = ref({ "WarehouseinId": "", "WarehouseinType": "", "OrderId": "", "SupplierNumber": "", "SupplierName": "", "SupplierPeople": "", "SupplierPhone": "", "MakeupPeople": "", "MakeupTime": "", "Remark": "", "Auditreason": "" });
        const editFormOptions = ref([[{ "title": "入库单号", "required": true, "field": "WarehouseinId", "type": "text" },
        { "dataKey": "入库类型", "data": [], "title": "入库类型", "field": "WarehouseinType", "type": "select" }],
        [{ "title": "关联单号", "field": "OrderId", "type": "text" },
        { "title": "供应商编号", "field": "SupplierNumber" }],
        [{ "title": "供应商名称", "field": "SupplierName" },
        { "title": "供应商联系人", "field": "SupplierPeople" }],
        [{ "title": "供应商联系方式", "field": "SupplierPhone" },
        { "title": "制单人", "field": "MakeupPeople" }],
        [{ "title": "制单时间", "field": "MakeupTime", "type": "datetime" },
        { "title": "备注", "field": "Remark", "type": "editor" }],
        [{ "title": "审核原因", "field": "Auditreason" }]]);
        const searchFormFields = ref({ "WarehouseinType": "", "OrderId": "", "SupplierNumber": "", "SupplierName": "" });
        const searchFormOptions = ref([[{ "dataKey": "入库类型", "data": [], "title": "入库类型", "field": "WarehouseinType", "type": "select" }, { "title": "关联单号", "field": "OrderId", "type": "like" }], [{ "title": "供应商编号", "field": "SupplierNumber", "type": "like" }, { "title": "供应商名称", "field": "SupplierName", "type": "like" }]]);
        const columns = ref([{ field: 'WarehouseinId', title: '入库单号', type: 'string', width: 220, require: true, align: 'left', sort: true },
        { field: 'WarehouseinType', title: '入库类型', type: 'int', bind: { key: '入库类型', data: [] }, width: 110, align: 'left' },
        { field: 'OrderId', title: '关联单号', type: 'string', width: 220, align: 'left' },

        { field: 'SupplierNumber', title: '供应商编号', type: 'string', width: 220, align: 'left' },
        { field: 'SupplierName', title: '供应商名称', type: 'string', width: 220, align: 'left' },
        { field: 'SupplierPeople', title: '供应商联系人', type: 'string', width: 220, align: 'left' },
        { field: 'SupplierPhone', title: '供应商联系方式', type: 'string', width: 220, align: 'left' },
        { field: 'MakeupPeople', title: '制单人', type: 'string', width: 220, align: 'left' },
        { field: 'MakeupTime', title: '制单时间', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'Remark', title: '备注', type: 'string', width: 220, align: 'left' },
        { field: 'Auditreason', title: '审核原因', type: 'string', width: 220, align: 'left' },
        { field: 'IsDel', title: '是否删除', type: 'int', width: 110, hidden: true, align: 'left' },
        { field: 'ProductId', title: '入库详情id', type: 'int', width: 120, require: true, align: 'left' }]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
